details widget name

Pages

Same cat chapters
  • Technical documentation: Site
Chapter details

Pages are beans and, like all beans, can be uniquely identified by a system id. Each page belongs to a certain website. Along with the general properties like name, description, etc. , all pages have a region. The region specifies the layout of the page. Each region is a tree data structure and contains other regions. One can say that the page contains the root region of the regions tree. Each region node (called just region) has in-degree of 1(except the root) and out-degree of five at most. Child nodes are distinguished as “north”, “west”, “center”, “east” and “south”. Their type is important for their visualization. Specific CSS styles may be attached to each region and applied to this region only upon rendering. The leaf region nodes may contain an ordered list of widgets. Different CSS styles may be applied to each widget in the region as well. //TODO Picture here.

There are two kinds of pages in i-Publisher – common and template. The common page is the ordinary website page. The template page (or just template) is a template for creating new pages. It consists of placeholders (template widgets) designed to contain certain types of widgets.

Each common page may have a master page. The master page is an ordinary page whose region (regions tree) acts as a root for the child's page region. The master page's region is in fact a subtree of the child's region. In this case, the child's layout consists only of the regions that do not belong to the master. Only these regions are stored in the database. When the page bean is requested, first the layout of the master is loaded and then the page specific regions are attached to the corresponding master page regions. Later, when we talk about flat page we will be referencing a page without a master. The templates are flat pages (although this is not exactly true as we will see in //TODO template widgets metadata chapter)

Each page should implement the following interfaces:

  • IPageProxy – the interface of the page proxy

  • IPage – the interface of the page object. It should extend the

  • ISpecificPageManagementService – the management service that handles the specific data for each type of page;

  • IExportProvider – the specific export provider service;

  • IImportProvider – the specific import provider service;

     

should extend the following classes:

  • APage – implements the common properties of all pages;

  • APageXmlParser – parses the exported XML upon import;

  • APageXmlProvider – provides an XML component for exporting the page.

     

and should be adaptable to the following interfaces:

  • IPageProxyService – adapts String(page type) to get the page proxy from an id ;

  • IBeanProvider – adapts IPageProxy to get the page bean;

  • ISpecificPageManagementService – adapts IPage to the management service for the specific type of page;

  • IExportProvider – adapts IPage to the specific export provider;

  • IImportProvider - adapts IPage to the specific import provider.

 

There are some collective services to manage the pages:

  • IPageManagementService – this is the main management service. When obtaining a list of pages, they are not completely loaded due to performance and speed issues. To get the whole page with the region loaded one have to use the IGetPageManagementService and load the page individually;

  • IGetPageManagementService – retrieves the page by its proxy.

  • IPageSaverService – performs some common actions upon page saving

     

There are some helper services that can be called to manage common page properties:

  • IPageAbstrDAOService – this DAO service manages the storage of the common page properties like name, description, region, ets.

  • IRegionService – implements some commonly used region operations – duplicate region, create region's XML representation, parse XML, etc.

  • IPagePackageService – export/import of the common page attributes, etc.

 

For the template pages, there is a special ITemplateService to manage their specific actions

 

Entities connected with pages:

  • IRegion – this bean represents a region node. Regions like all beans are uniquely identified by their id;

  • ILayout – used in the GUI for dividing page layout into regions;

  • PageThumbnailGenerator – used for generating thumbnail of a given page

  • ISEOProperties – describes the SEO properties of a page. It is separated as a different plugin – page addon. The search engine optimization properties define what kind of metadata will be included in the HTML page after rendering. Page addon is created by implementing the IPageAddon interface.

 

Database representation:

  • atlas.site_page – the main table that contains the system and general page information, including its id;

  • atlas.site_page_common – contains the specific information about the common pages. This table references the atlas.site_page;

  • atlas.site_page_template – contains the specific information about the template pages. This table references the atlas.site_page as well;

  • atlas.site_page_region – contains the regions tree. Each region references to the page it belongs to. As mentioned above, the master page regions are stored only ones and are referencing the master page only;

  • atlas.site_page_region_widget – a join table between the regions and the widgets they contain.

  • atlas.site_page_seo_properties – for the SEO properties.